from htstool.models import *
from htstool.util import *
from htstool.plot import scatter


if __name__=="__main__":
	summ_grp=PlateGroup.objects.get(groupname='summarised plates subtract')
	plate_reps_list=groupby_platename(summ_grp.plates)

	for plate_reps in plate_reps_list:
		if len(plate_reps)==2:
			rep1, rep2=plate_reps
			scatter(rep1.data.dataframe, rep2.data.dataframe, xlabel='replicate '+str(rep1.replicate),
					ylabel='replicate '+str(rep2.replicate), title='Delta-Z of plate '+
					rep1.platename, saveas=rep1.platename+'.png')
